Mule : Object Containers
This page last changed on Jun 16, 2006 by tcarlson.
Mule can be configured to use and manage any object from external containers or Naming Directories such as Jndi, Ejb, Spring, Pico, Plexus, or HiveMind. Supported Containers
Configuring ContainersYou can configure zero or more containers in a single Mule instance using the <container-context> element. <container-context name="jndi" className="org.mule.impl.container.JndiContainerContext"> <properties> <property name="java.naming.factory.initial" value="org.foo.jndi.InitialContextFactory"/> </properties> </container-context> This will configure a Jndi container. By default, when looking up an object Mule will search each of the containers in the order they are configured. Configuring Container PropertiesManaging Container objectsMule services can be objects configured in an object container. To expose a container objects as a Mule service you need to set the implmenetation attribute of the <mule-descriptor> element to the name of the object to look up. Optionally, You can also set the container attribute to specify which container to load the object from. <mule-descriptor name="MyComponent" implementation="myJndiObject" container="jndi"> .... </mule-descriptor> Container PropertiesAny object specifed in Mule Xml that has a <properties> element can reference objects in containers as properties. These are properties that are retrieved from a configured IoC or Naming container, such as Spring, Jndi or EJB. <properties> <container-property name="testProperty" reference="testBean" required="true" container="jndi"/> </properties>
|
Document generated by Confluence on Nov 27, 2006 10:27 |